#include "ParsingJson_Parser.h"

namespace vl
{
	namespace parsing
	{
		namespace json
		{
/***********************************************************************
ParserText
***********************************************************************/

const wchar_t parserTextBuffer[] = 
L"\r\n" L""
L"\r\n" L"class Node"
L"\r\n" L"{"
L"\r\n" L"}"
L"\r\n" L""
L"\r\n" L"class Literal:Node"
L"\r\n" L"{"
L"\r\n" L"\tenum Value"
L"\r\n" L"\t{"
L"\r\n" L"\t\tTrue,"
L"\r\n" L"\t\tFalse,"
L"\r\n" L"\t\tNull,"
L"\r\n" L"\t}"
L"\r\n" L""
L"\r\n" L"\tValue value;"
L"\r\n" L"}"
L"\r\n" L""
L"\r\n" L"class String:Node"
L"\r\n" L"{"
L"\r\n" L"\ttoken content(JsonUnescapingString)\t\t\t\t@Color(\"String\");"
L"\r\n" L"}"
L"\r\n" L""
L"\r\n" L"class Number:Node"
L"\r\n" L"{"
L"\r\n" L"\ttoken content;"
L"\r\n" L"}"
L"\r\n" L""
L"\r\n" L"class Array:Node"
L"\r\n" L"{"
L"\r\n" L"\tNode[] items;"
L"\r\n" L"}"
L"\r\n" L""
L"\r\n" L"class ObjectField:Node"
L"\r\n" L"{"
L"\r\n" L"\ttoken name(JsonUnescapingString)\t\t\t\t@Color(\"AttName\");"
L"\r\n" L"\tNode value;"
L"\r\n" L"}"
L"\r\n" L""
L"\r\n" L"class Object:Node"
L"\r\n" L"{"
L"\r\n" L"\tObjectField[] fields;"
L"\r\n" L"}"
L"\r\n" L""
L"\r\n" L"token TRUEVALUE = \"true\"\t\t\t\t\t\t\t@Color(\"Keyword\");"
L"\r\n" L"token FALSEVALUE = \"false\"\t\t\t\t\t\t\t@Color(\"Keyword\");"
L"\r\n" L"token NULLVALUE = \"null\"\t\t\t\t\t\t\t@Color(\"Keyword\");"
L"\r\n" L"token OBJOPEN = \"\\{\"\t\t\t\t\t\t\t\t@Color(\"Boundary\");"
L"\r\n" L"token OBJCLOSE = \"\\}\"\t\t\t\t\t\t\t\t@Color(\"Boundary\");"
L"\r\n" L"token ARROPEN = \"\\[\"\t\t\t\t\t\t\t\t@Color(\"Boundary\");"
L"\r\n" L"token ARRCLOSE = \"\\]\"\t\t\t\t\t\t\t\t@Color(\"Boundary\");"
L"\r\n" L"token COMMA = \",\";"
L"\r\n" L"token COLON = \":\";"
L"\r\n" L"token NUMBER = \"[\\-]?\\d+(.\\d+)?([eE][+\\-]?\\d+)?\"\t@Color(\"Number\");"
L"\r\n" L"token STRING = \"\"\"([^\\\\\"\"]|\\\\[^u]|\\\\u\\d{4})*\"\"\"\t\t@ContextColor();"
L"\r\n" L""
L"\r\n" L"discardtoken SPACE = \"\\s+\";"
L"\r\n" L""
L"\r\n" L"rule Node JLiteral"
L"\r\n" L"\t= STRING:content as String"
L"\r\n" L"\t= NUMBER:content as Number"
L"\r\n" L"\t= \"true\" as Literal with {value = \"True\"}"
L"\r\n" L"\t= \"false\" as Literal with {value = \"False\"}"
L"\r\n" L"\t= \"null\" as Literal with {value = \"Null\"}"
L"\r\n" L"\t;"
L"\r\n" L""
L"\r\n" L"rule ObjectField JField"
L"\r\n" L"\t= STRING:name \":\" JValue:value as ObjectField"
L"\r\n" L"\t;"
L"\r\n" L""
L"\r\n" L"rule Object JObject"
L"\r\n" L"\t= \"{\" [JField:fields {\",\" JField:fields} ] \"}\" as Object"
L"\r\n" L"\t;"
L"\r\n" L""
L"\r\n" L"rule Array JArray"
L"\r\n" L"\t= \"[\" [JValue:items {\",\" JValue:items} ] \"]\" as Array"
L"\r\n" L"\t;"
L"\r\n" L""
L"\r\n" L"rule Node JValue"
L"\r\n" L"\t= !JLiteral"
L"\r\n" L"\t= !JObject"
L"\r\n" L"\t= !JArray"
L"\r\n" L"\t;"
L"\r\n" L""
L"\r\n" L"rule Node JRoot"
L"\r\n" L"\t= !JObject"
L"\r\n" L"\t= !JArray"
L"\r\n" L"\t;"
;

			vl::WString JsonGetParserTextBuffer()
			{
				return parserTextBuffer;
			}

/***********************************************************************
SerializedTable
***********************************************************************/

const vint parserBufferLength = 4034; // 15032 bytes before compressing
const vint parserBufferBlock = 1024;
const vint parserBufferRemain = 962;
const vint parserBufferRows = 4;
const char* parserBuffer[] = {
"\x00\x0B\x00\x02\x9F\x71\x02\x80\x01\x7F\x05\x06\x83\x20\x0F\x30\x00\x36\x86\x00\x72\x00\x05\x82\x86\x02\x83\x29\x00\x74\x11\x80\x09\x30\x02\x36\x00\x67\x07\x94\x87\x89\x82\x83\x85\x86\x0F\x8D\x92\x83\x97\x06\x81\x21\x8C\x30\xCE\x00\x01\x30\x05\x34\x01\x32\x22\x86\x88\x8A\x80\x89\x97\x8C\x96\x06\xCB\x37\x80\x09\x38\x03\x3A\x88\x12\xE4\x39\x83\x85\x90\x03\x92\x87\x48\x93\x86\x8D\x92\x82\xA0\x9D\xA2\x47\xAA\x80\x0A\xA4\x82\x9D\xA7\xA7\x3E\xAB\x93\xA1\xA3\xA0\xAD\xA8\xAE\x23\xBB\xA6\x9D\x91\xAB\x90\x04\x83\x42\x10\xB5\x3E\x8B\xAB\x9B\x8D\xA2\x5D\xCC\xBC\x88\x9D\xB6\x83\xB6\x81\x71\x8D\xB3\xBF\x8A\xA4\x9A\x88\xBC\x69\xDF\xAC\xBA\xAE\xB0\xBA\xB8\xBA\x85\xF7\x8B\xA4\x9B\xB8\xA8\xC6\xBF\x8E\x82\xD0\xD6\xB7\xC3\xCA\xB4\xA7\x8B\xBF\x86\x96\x82\x82\x9B\xB8\x9B\x62\x43\x92\x99\xB7\x84\x05\xCB\x8F\x1A\xB8\xB8\x30\x90\xB1\xAA\x82\x00\x54\x80\x0D\xAF\x92\x8A\x88\x9A\xBC\xFF\x41\xF9\xCC\x2C\x88\x98\x9C\xDF\x50\xC1\xC1\xE4\x06\x82\x99\x86\xA5\x38\xCA\xFF\x64\xD0\x06\xD1\x9A\x00\xA9\xC7\xC7\x8A\xE4\xEF\x24\xEC\x00\x6A\x43\xA3\x30\x92\xE9\x82\x80\xEF\xA9\xE1\xF8\x83\xFA\x8E\x21\xE2\x9C\x0F\xDC\x9C\xF7\x80\x9A\x89\x8F\x8F\x21\xD2\xF9\xDB\xDB\x88\xE5\xA3\xA6\x1D\x71\x67\x77\x1C\xDB\x42\x76\x40\x71\x01\xAA\x66\x5F\x43\x4D\x76\x1B\x80\x00\x73\x51\x73\x7D\x69\x10\x97\x79\x77\x46\xB9\x63\x7D\x40\x6C\x43\x5C\x82\x75\x77\xDF\x6A\x70\x00\x7B\x00\x14\x76\x1B\x7B\x50\x4A\x54\x81\x79\x06\x68\x70\x7A\x78\x30\x6E\x7D\x44\x7C\x75\x4C\x72\x43\x47\x34\x76\x48\x4F\x48\xE6\x40\x0E\x8A\x88\x24\xB2\x83\x51\x7C\xBA\x46\x4E\x80\x4D\x0F\x51\x85\x83\x74\xF4\x5A\x46\x7C\x5D\x21\x59\x80\x44\x87\x38\x5C\x87\x6F\x03\x06\x64\x06\x40\x96\xB7\x5D\x9B\x92\x74\x5E\x83\x42\x76\x72\x61\x9F\x94\x99\x98\x63\x8A\x79\x02\x41\x54\x00\x02\x14\x00\x55\x00\x05\x10\x00\x56\x00\x0F\x48\x71\x71\xB3\x96\x8D\x7D\x15\xB8\x47\x6E\x00\x06\x4A\x06\x42\x7B\x77\x80\x08\x47\x9C\x75\x85\xA9\x9D\x91\x02\x67\x88\x90\x00\x04\xBB\x86\x43\x00\x06\x6B\x94\x85\x9C\xC4\x44\x79\xA0\x00\x78\xB2\x90\x03\x9E\x1F\x73\x5F\x43\x43\x80\x82\x4B\x9D\x6E\xDE\x71\x5A\x12\x8F\x00\x10\x1E\xA6\x4C\xA5\x80\x0C\x14\x00\x7B\x00\x04\xA6\x40\x4D\x7F\x5C\xAA\xAA\xA0\x44\x7E\x77\xA1\x00\x31\xA3\xAD\x1F\x9F\xA3\x63\x5A\x40\x2F\x6F\x9F\x9A\x77\xAE\xB3\x90\xAE\x41\xB3\x9B\x1C\xA0\x6E\x98\x48\xBE\x9B\xB5\x0B\x7E\xA6\xA2\xA7\xC2\x80\x0D\x15\x89\xD5\x93\xBB\x42\x77\x4D\x00\x05\xBB\x4B\x23\x6C\x04\xB6\x98\xC1\x4A\x6E\x76\xB6\x32\x63\x4A\x0C\x00\xBA\x9F\x8D\x70\x9C\xE6\x80\x01\x5F\x9C\x6F\x9F\x06\x42\xB4\xB3\xAD\x0E\xB4\x00\x3F\x32\xA5\x5F\x0A\x00\x28\x00\x02\x0B\x06\xCA\x58\xC1\x0A\x04\xC9\xC0\x02\xB4\x38\x73\x9F\xB6\xB4\x08\xC1\xC3\xC1\xC1\xB3\x8E\xC0\x00\xC4\x05\xD6\xA0\x02\xC8\xD4\x58\x4D\x9B\x9B\x49\x15\x70\x03\x11\x00\x1B\x06\x42\x08\x12\xD2\xBE\x16\xC1\xB3\xB0\xCF\xB4\x1F\x34\xD3\xC0\x03\xCC\x73\x77\xC9\xCF\x5C\x1D\xF4\xA0\x00\x0D\x00\x04\xB0\xC6\x0A\x00\x30\xC2\xA2\x40\x4B\xD2\x58\xAC\x7D\xAE\xAF\x4B\x43\x9C\xB7\x86\xC4\x80\xC2\x3D\x92\x7A\x96\x40\xBA\xAB\xA8\x82\x71\x1B\x4F\xA2\x06\x41\x5E\xC5\x72\x80\x72\x0F\x4C\xCF\x99\x43\x0D\x5A\x48\x46\x46\x86\x70\x4D\x02\x41\x40\x00\x00\x08\x00\x5A\xBC\x00\x01\xD9\x09\x9A\x7F\xA2\x0F\xF4\xA4\xDC\xA6\xD9\x0A\x8F\xAE\x02\xE0\x5F\xE7\xDF\x80\xC3\x6F\xDC\x60\x4E\x6B\x02\x75\xD7\xDE\xDE\x7C\xE0\xD8\xD8\x00\x80\xDD\xD3\xE1\xDF\x61\xD0\x5D\xD1\xE5\x8A\xCF\xAC\xC1\x0C\x00\x3A\x36\x40\xE5\x9B\xD6\xEF\x80\xE0\xF3\xB7\xD0\xCD\xA8\x50\x4F\x40\xCF\xDD\x34\x44\x87\xDD\xE2\x85\xD0\x52\xE6\x51\x84\xE8\x16\xDE\xD0\x77\xC7\x90\x56\x92\x77\xFD\x0F\xEC\xCC\xD6\x63\xA9\xD3\xEF\xC4\xB3\xD2\xA0\xEA\xB8\xFE\xD0\x54\xEB\xC7\xC0\x0E\xA0\x54\x91\x8B\xF4\xEC\xA4\xBF\xD1\xFD\xE7\x43\xBB\xC7\x59\x82\xEF\x77\xF5\xA1\xF3\x83\xC4\xC0\x06\xF2\xEB\x00\x2E\x7F\xA1\xF6\xB3\xC5\xD0\x02\xF3\x00\x10\xF4\xE2\xF4\x0F\x54\xF7\xDE\x4C\x71\xA5\xBB\xBF\xB5\x77\x6D\x77\x88\x53\x40\x6C\x0E\x5B\x7E\x76\x2A\x67\x37\x77\x5A\x35\x6E\xFA\x76\x7C\x73\x97\x7A\x7F\xF2\x4E\x4D\x4E\xED\x76\x28\x81\xDE\x77\x71\xF8\x3D\x7F\x76\xF3\x40\x02\x78\x49\x43\x29\xF1\x55\x7D\x4C\x89\x0A\x49\x7E\xCD\x60\x03\xF3\x7B\x69\x75\xD0\x53\x78\x00\x02\x86\x67\xB5\x29\x62\x26\x96\x41\x87\x77\x1A\x54\x2E\x80\x06\x87\x83\xDF\x4D\x77\x49\xF8\x20\x01\xDD\x1A\x79\x83",
"\x07\x50\x00\x71\xF7\x7F\x7B\xC2\x57\x5C\x6C\x98\x33\x4C\x30\xF3\x79\x49\xFD\x2C\x85\x89\xBF\x7F\x75\x6E\xD4\x2B\x55\x9D\x0F\x5A\x48\xCD\x5B\x8B\x78\x43\x23\x76\xFA\x27\x7C\x85\x2F\xA1\x80\x27\x12\x81\x04\x15\xC9\x8A\x83\x28\xAB\x82\x8B\xE8\x63\x29\x1A\xAC\x8F\x46\x18\x5A\x25\x81\x2A\x93\x88\x1C\xDC\x82\x8E\x18\xBF\x72\x8D\xAB\x5C\x35\xE7\x45\x28\x8A\xC1\x42\x96\x3F\x81\x62\x21\x20\xFD\x36\x2F\xA2\x0C\x65\x06\x00\x0C\x10\x19\x8B\x9D\x37\x46\x98\x76\x8F\xEC\x72\x59\xFC\x52\x57\x6F\x3D\xA0\x88\x27\x37\x97\x6C\xE7\x36\x28\x81\xBA\x5E\x80\x66\xEA\x51\x7E\x27\xE7\x8F\x76\x01\xA3\x94\x7B\x77\x64\x5B\xDD\x5F\x5C\x7D\x6F\x71\x7D\x76\xBF\x67\x92\x25\x8E\x8C\x84\x5D\xBF\x37\x92\x02\x90\x66\x26\xBF\x7C\x93\x32\xB1\x88\x94\x98\x89\x88\x29\xC2\x8D\x83\xEA\x69\x97\x77\xAB\x95\x81\x28\xCA\x90\x96\xF9\x73\x95\x7A\xB6\x9F\x74\x2E\xF7\x6E\x96\xA2\x20\x5A\x91\xED\x68\x44\x91\x1A\x72\x48\x1A\x4A\x2C\x61\x33\x1E\x8E\x40\x28\x75\x9D\x14\x40\x9E\x87\x00\x07\x64\x00\x34\x8B\x65\x56\xBF\x70\x47\xD7\x28\x98\xCC\x73\x5A\x94\x3A\x47\x9E\x9E\xE7\x7C\x8C\x32\xDB\x9C\x55\xF4\x36\x89\x9C\x33\x4E\x9D\x21\xE0\x96\x8D\x0A\x87\x74\xA1\xFF\x8A\x6C\x44\x6D\x6E\x52\x28\xBD\x41\x6F\xC6\x82\xA3\x25\xF7\x6B\xA1\x5E\x8C\x97\x97\x9A\x7D\x9A\x23\x80\x02\x06\x4F\x6B\x9E\xA3\x95\x9F\x96\x04\xC2\x96\x83\x62\x91\x99\x7D\xAE\x80\x6F\x32\xE5\x7E\x98\x0B\xAF\xA2\x84\xC9\x8F\x94\x02\xB2\x93\x61\x5A\x96\x84\xA0\x22\xAC\x99\x16\xF6\x4F\xA2\x6F\xA1\xA5\xA8\x23\xA9\x9F\x9C\x27\xA4\x93\x41\xAF\x99\x93\x2D\xB0\x9A\x3F\x9A\xA3\x9A\x9D\x8D\x9C\x7D\xCF\x9B\x77\x4D\xC8\x91\xA6\x01\x73\xA6\x9A\x3D\xAB\x79\x36\x87\x89\x96\xA4\xAB\x5C\x8E\x21\x47\xA2\xC8\x2B\x55\x8F\xF5\x30\x27\x91\x00\x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\xD3\xC6\xDD\x78\xC4\x6F\xC7\x76\xF2\xD3\xCC\x9E\xA6\xE6\x3B\xD1\xCE\x9D\x34\xF5\xA5\x9F\x47\xCE\xCE\x99\x90\xC1\xAC\x98\x53\xC7\xD3\xDE\xD3\xBF\xBB\x99\xC6\x90\xB3\x8C\x64\x68\x1E\xCA\xE1\xBC\xC2\xCA\x67\xEC\xEC\xE5\xAA\x32\xAA\xCB\xF7\xC6\xDF\x9E\xFC\xDE\xAD\x9A\x3C\x52\x63\x03\x37\x78\xDC\x46\x56\xB4\x6E\x71\x75\x19\x68\x66\x6F\x7E\xBA\x6C\x4E\x19\x7D\x6B\xB9\x71\x69\xC0\x63\x4D\xC2\x6A\x4F\x7E\x4C\x62\xFD\x79\x4C\xB6\x79\x7C\xCD\x6E\x5B\x1D\x5F\x75\xBF\x70\x15\x7B\x2E\x1C\x75\x1E\x27\x68\x2A\x1C\xCE\x77\x50\x20\x24\x6D\x30\x17\x1B\x16\x0A\x13\x13\x28\x52\x4E\x5C\x1F\xF3\x77\x1B\x18\x00\x83\xC1\x1D\x70\xBE\x5D\x23\x1D\x86\x66\xB7\x1A\x01\x38\x8C\x24\x29\x77\x62\x23\x80\x11\xD0\x1D\x25\x1C\x01\x84\x44\x7D\x75\x45\x8F\x1C\x43\x17\x1B\x1E\x01\x84\x1C\x05\x2A\xAC\x1F\x0F\xB7\x13\x12\x65\x29\x85\x5A\x8A\x13\x69\x1B\x27\xB1\x25\x26\xB1\x2B\x27\xB7\x1D\x20\xFF\x4B\x27\x25\x45\x41\x20\x8A\x7A\x50\x15\x26\xC3\x18\x79\x5D\x29\x86\x2E\x4F\x10\x55\x8D\x14\x5F\x81\x26\x61\x81\x26\x64\x8A\x51\x4D\x12\x79\x0F\x19\x3D\x70\x84\x76\x59\x8D\x86\x21\x8F\x10\xB7\x1F\x87\xF8\x3E\x19\xD4\x15\x87\x5E\x27\x87\x5E\x29\x87\x44\x87\x2F\x6D\x7F\x10\x86\x8A\x44\x6C\x87\x20\x6E\x85\x88\x48\x43\x88\x68\x29\x16\xE4\x6A\x88\x5D\x21\x2B\x58\x87\x2C\x03\x4B\x21\xC7\x7A\x11\x98\x80\x4E\x81\x79\x85\xD4\x15\x7A\x0B\x4B\x11\xA7\x8E\x7B\x6A\x82\x87\x69\x1C\x5B\x9E\x8F\x27\x06\x11\x8A\x02\x12\x25\xA4\x8B\x43\x2D\x81\x2E\xA0\x30\x88\x65\x25\x32\x7C\x27\x1F\xCC\x7F\x8A\xBF\x87\x88\x9E\x13\x12\x55\x3B\x85\x9E\x1C\x88\x5D\x23\x12\x1D\x06\x10\xB1\x24\x1D\xD1\x8A\x85\x93\x87\x39\xCB\x8B\x85\x38\x7F\x4F\xCC\x8D\x8D\x5C\x8F\x8D\xB9\x8E\x8D\x07\x15\x35\xFF\x03\x8D\x61\x23\x12\x15\x02\x8D\xC6\x22\x10\xE9\x8A\x85\xDB\x8A\x51\xB8\x83\x2D\xB6\x77\x1B\x3A\x86\x66\xE5\x86\x10\x4D\x17\x85\x5B\x2A\x8E\x15\x1B\x8F\xEE\x82\x38\x36\x7E\x89\x00\x29\x7F\x04\x24\x8F\xED\x73\x7F\xF7\x8F\x34\x5E\x23\x12\x22\x36\x8E\x02\x12\x32\xC1\x80\x90\xFF\x42\x90\x06\x16\x55\x06\x94\x6F\x66\x52\x8E\x9B\x8A\x13\x4D\x3A\x2B\xCC\x85\x85\x3D\x20\x91\xE2\x85\x85\x3C\x2B\x85\xF1\x87\x1B\x3C\x82\x6B\x0C\x67\x91\xDA\x74\x24\x09\x97\x10\xB1\x2D\x34\xFA\x82\x10\xD2\x62\x10\xD9\x8E\x25\x29\x9C\x82\xED\x1E\x5B\x2C\x95\x6B\xBE\x54\x1D\x35\x9A\x8A\x1B\x79\x64\x9E\x86\x22\x6F\x67\x1B\x29\x8A\x59\x2F\x92\x93\xB7\x86\x10\xBC\x57\x93\x5D\x29\x93\xD2\x7B\x93\x3E\x8B\x8E\x2D\x95\x17\xD4\x1C\x5B\x11\x90\x4E\x0C\x65\x94\x06\x1E\x60\xDD\x7D\x25\x49\x97\x5B\x1A\x9F\x91\x69\x13\x12\xAF\x65\x26\x27\x98\x8F\x2E\x19\x91\x56\x92\x70\x78\x11\x2B\x2F\x94\x6E\x33\x90\x00\xFE\x26\x93\x5B\x84\x83\x4E\x5D\x93\xF0\x6E\x54\xD4\x17\x97\x42\x98\x91\xF3\x70\x95\x65\x2B\x84\x84\x6F\x92\x62\x8D\x94\x02\x15\x8D\xB6\x29\x97\x6D\x95\x83\x6F\x9D\x97\x88\x44\x8D\xDA\x87\x90\x4E\x54\x98\x61\x2F\x8E\x27\x6A\x91\x55\x8E\x85\x5B\x8B\x27\x4D\x12\x92\x5E\x2F\x6F\xF3\x7D\x14\x8C\x9B\x95\x41\x7C\x4A\x89\x9A\x90\x1F\x45\x86\x6C\x2A\x7B\x43\x17\x8D\x0F\x25\x89\x02\x19\x8A\xC6\x83\x76\x87\x83\x87\xFC\x89\x85\xA0\x95\x29\x95\x92\x98\x33\x86\x10\xA7\x99\x99\x12\x9A\x51\xAB\x92\x8F\xFF\x4B\x87\x0F\x2E\x87\x99\x81\x8B\x81\x86\x89\x9A\x87\x9B\xA9\x85\x85\x89\x8F\x99\x6C\x9F\x90\xBF\x92\x83\x88\x46\x9A\xD9\x9C\x72\xC7\x9E\x88\xAA\x90\x89\xB1\x39\x48\xB0\x81\x87\xCF\x95\x9B\x97\x8E\x8B",
"\xB8\x9A\x44\x55\x89\x1B\x5A\x96\x87\xD7\x9A\x75\xFF\x80\x9C\xDB\x92\x9C\xDD\x96\x62\xAC\x4E\x19\x22\x37\x6A\x60\x81\x9F\xA2\x9D\x25\xA4\x91\x9C\x8B\x97\x9F\x36\x70\x8E\x07\x1D\x89\xD6\x9C\x9A\xFF\x9C\x97\x41\x5C\x9D\xF3\x99\x9A\x15\x41\x8F\xBA\x82\x7A\x55\x2D\x8B\x5C\x3D\x9C\xE6\x98\x9A\xAC\x87\x21\x12\x12\x9D\x6E\x85\x85\xB4\x89\xA0\xD3\x2B\xA0\x91\x9D\xA0\xF6\x9F\xA0\x2C\x72\xA1\x06\x16\x7C\xBC\x86\x8A\xEA\x96\x9B\xC4\x92\x10\x3F\x45\x1C\x41\x4E\xA1\xD1\x9B\x91\x03\x1A\x2B\x0F\x7E\x8D\x20\x96\x10\x41\x95\x96\x40\xAB\x85\x24\x96\x10\x63\x31\xA4\x9C\x99\x16\x3A\xA6\xA4\x20\xA6\x10\x13\x0B\x85\xB1\x2D\x14\xEF\x9E\x25\x63\x94\x22\xF1\x80\x2A\x76\x16\x69\x7C\x9B\x92\x06\xAF\x0F\x9E\x9A\x85\xBD\x92\x10\xFC\x91\xA3\xDA\x96\x49\x0E\xA1\x98\x10\xAA\x24\xDF\x96\x24\xAE\x92\x10\x67\x8D\x45\x18\xA0\x8C\x61\x22\x88\xCE\x96\xA3\xCE\x9A\x9B\x02\x15\x8B\x06\x1F\xA5\x46\x77\x9F\x26\xA3\xA0\x28\xA8\x9F\x15\x49\xA6\x02\x16\x7B\xCA\x95\x78\x38\x12\x9B\x8F\x24\x9B\xEB\x97\x39\x74\xA6\x9E\xD4\x9B\x9B\x65\x2A\xA7\x61\xA3\x9A\x96\x95\x9F\x7E\xA6\xA6\xDE\x98\x87\x6A\xA6\x9C\xE2\x9A\x3C\x88\xAB\x86\x71\xA0\x9D\x73\xAF\xA2\x1F\xA9\x16\xEE\x9E\xA4\xF1\x93\xA9\x00\xA5\xA9\x64\xA7\xA2\x98\xA0\xA8\x4A\x2A\x9F\xFE\x89\x85\x4F\xA3\xAB\xA8\x90\x97\xD3\x23\x9C\x94\xA3\x84\xAC\x45\x85\x1D\x95\x96\x55\x88\xA0\x5E\xA9\xAA\x7C\xA6\x56\x65\xA7\xAB\xB0\xA3\x14\x2A\xA2\x10\x2C\xAD\x21\x16\xA4\x9E\xC7\x84\x89\x62\xAB\xA1\x0A\x2D\xA8\x80\x8B\xA4\x77\xA2\xA2\x4D\x1A\xAA\x0C\xA6\xAC\xAE\xA8\xAC\x36\x7B\xAC\xA3\x84\xA1\xA2\x76\xAD\xC8\x82\xA6\x33\xA4\x8C\x21\x16\xAE\x94\x83\xA4\x02\x14\x01\x26\x99\x9D\x41\x68\x94\xD1\x7F\x7C\x30\x9A\x13\xB1\x24\x97\x8A\x96\x97\x93\x22\xAF\xB2\x64\xAF\xE0\x41\x64\x7F\x9B\x85\x53\xA0\x13\x98\x9D\x88\x53\x7D\x75\x88\x97\x8E\xAE\xA7\xB0\xB8\x53\xAF\xA2\x88\x59\x3A\x98\x5B\xBA\xA2\x96\xF5\xA7\x50\x0E\xBC\x97\x05\xA6\xA4\x5D\x28\xAD\x00\x0D\xA4\x5A\x85\xAB\x34\x94\xB0\x17\xBA\x59\x55\xA6\x10\x15\x8B\xAA\x5C\x9C\x93\x1C\xBD\xB1\x69\x1F\x6A\xED\x8D\xB2\x66\x9A\x13\x5D\xAC\x9B\xF1\x91\xB3\xC8\xAC\x60\xC7\xA2\xA6\x99\xA8\xB0\x83\xAB\xA6\xB9\x76\x42\xB1\x9F\xA6\xE7\xA2\xA5\xA2\xA9\xA1\xA4\xAA\x89\x76\xA1\x2C\xDA\xA6\x10\x38\xBC\xB3\x08\x8A\x14\x3B\xBB\xAB\x67\xA3\x14\x82\xAD\x9A\x7A\x83\x28\xCB\x93\xB4\xA8\x89\x9E\x46\xB8\x9E\x37\xA7\xA1\x5D\xBA\xB4\x69\x15\x9D\xC3\xAC\x9A\x4F\xB4\xB5\x3E\x96\x66\x53\xBA\xB2\x55\xB8\x13\x57\xB6\x7B\x45\x81\x89\xD0\xAB\xA8\xB3\x91\xAA\x60\xB3\xAA\x62\xB5\x9E\xD7\xA6\xAA\x4E\x98\xAA\x68\xB7\x9F\x3A\xBF\xAD\x50\xB5\xA0\x55\x8B\x9F\x80\xB3\x2D\x69\xBE\xB6\x6B\xB9\x64\x6D\xBA\xB1\xDC\x83\x10\x9C\x80\xA9\x61\x2A\xA7\x8B\xB9\xA5\xBE\x5F\xB8\x91\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CD\xB7\x3A\x17\x1B\x80\x9F\xBD\x5E\x23\xBC\x02\x11\xA5\xCF\x81\x9F\x55\xC9\xBE\x2C\x45\x74\xB2\xA0\xA6\xD5\xB3\x2D\x5D\xCE\xBF\x56\x7F\xAC\x56\xC9\xC6\xB7\x10",
};

			void JsonGetParserBuffer(vl::stream::MemoryStream& stream)
			{
				vl::stream::MemoryStream compressedStream;
				for (vint i = 0; i < parserBufferRows; i++)
				{
					vint size = i == parserBufferRows - 1 ? parserBufferRemain : parserBufferBlock;
					compressedStream.Write((void*)parserBuffer[i], size);
				}
				compressedStream.SeekFromBegin(0);
				vl::stream::LzwDecoder decoder;
				vl::stream::DecoderStream decoderStream(compressedStream, decoder);
				vl::collections::Array<vl::vuint8_t> buffer(65536);
				while (true)
				{
					vl::vint size = decoderStream.Read(&buffer[0], 65536);
					if (size == 0) break;
					stream.Write(&buffer[0], size);
				}
				stream.SeekFromBegin(0);
			}
/***********************************************************************
Unescaping Function Foward Declarations
***********************************************************************/

			extern void JsonUnescapingString(vl::parsing::ParsingToken& value, const vl::collections::List<vl::regex::RegexToken>& tokens);

/***********************************************************************
Parsing Tree Conversion Driver Implementation
***********************************************************************/

			class JsonTreeConverter : public vl::parsing::ParsingTreeConverter
			{
			public:
				using vl::parsing::ParsingTreeConverter::SetMember;

				bool SetMember(JsonLiteral::JsonValue& member, vl::Ptr<vl::parsing::ParsingTreeNode> node, const TokenList& tokens)
				{
					vl::Ptr<vl::parsing::ParsingTreeToken> token=node.Cast<vl::parsing::ParsingTreeToken>();
					if(token)
					{
						if(token->GetValue()==L"True") { member=JsonLiteral::JsonValue::True; return true; }
						else if(token->GetValue()==L"False") { member=JsonLiteral::JsonValue::False; return true; }
						else if(token->GetValue()==L"Null") { member=JsonLiteral::JsonValue::Null; return true; }
						else { member=JsonLiteral::JsonValue::True; return false; }
					}
					member=JsonLiteral::JsonValue::True;
					return false;
				}

				void Fill(vl::Ptr<JsonNode> tree, vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)
				{
				}

				void Fill(vl::Ptr<JsonLiteral> tree, vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)
				{
					SetMember(tree->value, obj->GetMember(L"value"), tokens);
				}

				void Fill(vl::Ptr<JsonString> tree, vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)
				{
					if(SetMember(tree->content, obj->GetMember(L"content"), tokens))
					{
						JsonUnescapingString(tree->content, tokens);
					}
				}

				void Fill(vl::Ptr<JsonNumber> tree, vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)
				{
					SetMember(tree->content, obj->GetMember(L"content"), tokens);
				}

				void Fill(vl::Ptr<JsonArray> tree, vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)
				{
					SetMember(tree->items, obj->GetMember(L"items"), tokens);
				}

				void Fill(vl::Ptr<JsonObjectField> tree, vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)
				{
					if(SetMember(tree->name, obj->GetMember(L"name"), tokens))
					{
						JsonUnescapingString(tree->name, tokens);
					}
					SetMember(tree->value, obj->GetMember(L"value"), tokens);
				}

				void Fill(vl::Ptr<JsonObject> tree, vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)
				{
					SetMember(tree->fields, obj->GetMember(L"fields"), tokens);
				}

				vl::Ptr<vl::parsing::ParsingTreeCustomBase> ConvertClass(vl::Ptr<vl::parsing::ParsingTreeObject> obj, const TokenList& tokens)override
				{
					if(obj->GetType()==L"Literal")
					{
						vl::Ptr<JsonLiteral> tree = new JsonLiteral;
						vl::collections::CopyFrom(tree->creatorRules, obj->GetCreatorRules());
						Fill(tree, obj, tokens);
						Fill(tree.Cast<JsonNode>(), obj, tokens);
						return tree;
					}
					else if(obj->GetType()==L"String")
					{
						vl::Ptr<JsonString> tree = new JsonString;
						vl::collections::CopyFrom(tree->creatorRules, obj->GetCreatorRules());
						Fill(tree, obj, tokens);
						Fill(tree.Cast<JsonNode>(), obj, tokens);
						return tree;
					}
					else if(obj->GetType()==L"Number")
					{
						vl::Ptr<JsonNumber> tree = new JsonNumber;
						vl::collections::CopyFrom(tree->creatorRules, obj->GetCreatorRules());
						Fill(tree, obj, tokens);
						Fill(tree.Cast<JsonNode>(), obj, tokens);
						return tree;
					}
					else if(obj->GetType()==L"Array")
					{
						vl::Ptr<JsonArray> tree = new JsonArray;
						vl::collections::CopyFrom(tree->creatorRules, obj->GetCreatorRules());
						Fill(tree, obj, tokens);
						Fill(tree.Cast<JsonNode>(), obj, tokens);
						return tree;
					}
					else if(obj->GetType()==L"ObjectField")
					{
						vl::Ptr<JsonObjectField> tree = new JsonObjectField;
						vl::collections::CopyFrom(tree->creatorRules, obj->GetCreatorRules());
						Fill(tree, obj, tokens);
						Fill(tree.Cast<JsonNode>(), obj, tokens);
						return tree;
					}
					else if(obj->GetType()==L"Object")
					{
						vl::Ptr<JsonObject> tree = new JsonObject;
						vl::collections::CopyFrom(tree->creatorRules, obj->GetCreatorRules());
						Fill(tree, obj, tokens);
						Fill(tree.Cast<JsonNode>(), obj, tokens);
						return tree;
					}
					else 
						return 0;
				}
			};

			vl::Ptr<vl::parsing::ParsingTreeCustomBase> JsonConvertParsingTreeNode(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens)
			{
				JsonTreeConverter converter;
				vl::Ptr<vl::parsing::ParsingTreeCustomBase> tree;
				converter.SetMember(tree, node, tokens);
				return tree;
			}

/***********************************************************************
Parsing Tree Conversion Implementation
***********************************************************************/

			vl::Ptr<JsonLiteral> JsonLiteral::Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens)
			{
				return JsonConvertParsingTreeNode(node, tokens).Cast<JsonLiteral>();
			}

			vl::Ptr<JsonString> JsonString::Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens)
			{
				return JsonConvertParsingTreeNode(node, tokens).Cast<JsonString>();
			}

			vl::Ptr<JsonNumber> JsonNumber::Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens)
			{
				return JsonConvertParsingTreeNode(node, tokens).Cast<JsonNumber>();
			}

			vl::Ptr<JsonArray> JsonArray::Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens)
			{
				return JsonConvertParsingTreeNode(node, tokens).Cast<JsonArray>();
			}

			vl::Ptr<JsonObjectField> JsonObjectField::Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens)
			{
				return JsonConvertParsingTreeNode(node, tokens).Cast<JsonObjectField>();
			}

			vl::Ptr<JsonObject> JsonObject::Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens)
			{
				return JsonConvertParsingTreeNode(node, tokens).Cast<JsonObject>();
			}

/***********************************************************************
Visitor Pattern Implementation
***********************************************************************/

			void JsonLiteral::Accept(JsonNode::IVisitor* visitor)
			{
				visitor->Visit(this);
			}

			void JsonString::Accept(JsonNode::IVisitor* visitor)
			{
				visitor->Visit(this);
			}

			void JsonNumber::Accept(JsonNode::IVisitor* visitor)
			{
				visitor->Visit(this);
			}

			void JsonArray::Accept(JsonNode::IVisitor* visitor)
			{
				visitor->Visit(this);
			}

			void JsonObjectField::Accept(JsonNode::IVisitor* visitor)
			{
				visitor->Visit(this);
			}

			void JsonObject::Accept(JsonNode::IVisitor* visitor)
			{
				visitor->Visit(this);
			}

/***********************************************************************
Parser Function
***********************************************************************/

			vl::Ptr<vl::parsing::ParsingTreeNode> JsonParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex)
			{
				vl::parsing::tabling::ParsingState state(input, table, codeIndex);
				state.Reset(L"JRoot");
				vl::Ptr<vl::parsing::tabling::ParsingGeneralParser> parser=vl::parsing::tabling::CreateStrictParser(table);
				vl::Ptr<vl::parsing::ParsingTreeNode> node=parser->Parse(state, errors);
				return node;
			}

			vl::Ptr<vl::parsing::ParsingTreeNode> JsonParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex)
			{
				vl::collections::List<vl::Ptr<vl::parsing::ParsingError>> errors;
				return JsonParseAsParsingTreeNode(input, table, errors, codeIndex);
			}

			vl::Ptr<JsonNode> JsonParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex)
			{
				vl::parsing::tabling::ParsingState state(input, table, codeIndex);
				state.Reset(L"JRoot");
				vl::Ptr<vl::parsing::tabling::ParsingGeneralParser> parser=vl::parsing::tabling::CreateStrictParser(table);
				vl::Ptr<vl::parsing::ParsingTreeNode> node=parser->Parse(state, errors);
				if(node && errors.Count()==0)
				{
					return JsonConvertParsingTreeNode(node, state.GetTokens()).Cast<JsonNode>();
				}
				return 0;
			}

			vl::Ptr<JsonNode> JsonParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex)
			{
				vl::collections::List<vl::Ptr<vl::parsing::ParsingError>> errors;
				return JsonParse(input, table, errors, codeIndex);
			}

/***********************************************************************
Table Generation
***********************************************************************/

			vl::Ptr<vl::parsing::tabling::ParsingTable> JsonLoadTable()
			{
				vl::stream::MemoryStream stream;
				JsonGetParserBuffer(stream);
				vl::Ptr<vl::parsing::tabling::ParsingTable> table=new vl::parsing::tabling::ParsingTable(stream);
				table->Initialize();
				return table;
			}

		}
	}
}
namespace vl
{
	namespace reflection
	{
		namespace description
		{
#ifndef VCZH_DEBUG_NO_REFLECTION
			using namespace vl::parsing::json;

			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonNode, system::JsonNode)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonLiteral, system::JsonLiteral)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonLiteral::JsonValue, system::JsonLiteral::JsonValue)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonString, system::JsonString)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonNumber, system::JsonNumber)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonArray, system::JsonArray)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonObjectField, system::JsonObjectField)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonObject, system::JsonObject)
			IMPL_TYPE_INFO_RENAME(vl::parsing::json::JsonNode::IVisitor, system::JsonNode::IVisitor)

			BEGIN_CLASS_MEMBER(JsonNode)
				CLASS_MEMBER_METHOD(Accept, {L"visitor"})

			END_CLASS_MEMBER(JsonNode)

			BEGIN_CLASS_MEMBER(JsonLiteral)
				CLASS_MEMBER_BASE(JsonNode)

				CLASS_MEMBER_CONSTRUCTOR(vl::Ptr<JsonLiteral>(), NO_PARAMETER)


				CLASS_MEMBER_FIELD(value)
			END_CLASS_MEMBER(JsonLiteral)

			BEGIN_ENUM_ITEM(JsonLiteral::JsonValue)
				ENUM_ITEM_NAMESPACE(JsonLiteral::JsonValue)
				ENUM_NAMESPACE_ITEM(True)
				ENUM_NAMESPACE_ITEM(False)
				ENUM_NAMESPACE_ITEM(Null)
			END_ENUM_ITEM(JsonLiteral::JsonValue)

			BEGIN_CLASS_MEMBER(JsonString)
				CLASS_MEMBER_BASE(JsonNode)

				CLASS_MEMBER_CONSTRUCTOR(vl::Ptr<JsonString>(), NO_PARAMETER)

				CLASS_MEMBER_EXTERNALMETHOD(get_content, NO_PARAMETER, vl::WString(JsonString::*)(), [](JsonString* node){ return node->content.value; })
				CLASS_MEMBER_EXTERNALMETHOD(set_content, {L"value"}, void(JsonString::*)(const vl::WString&), [](JsonString* node, const vl::WString& value){ node->content.value = value; })

				CLASS_MEMBER_PROPERTY(content, get_content, set_content)
			END_CLASS_MEMBER(JsonString)

			BEGIN_CLASS_MEMBER(JsonNumber)
				CLASS_MEMBER_BASE(JsonNode)

				CLASS_MEMBER_CONSTRUCTOR(vl::Ptr<JsonNumber>(), NO_PARAMETER)

				CLASS_MEMBER_EXTERNALMETHOD(get_content, NO_PARAMETER, vl::WString(JsonNumber::*)(), [](JsonNumber* node){ return node->content.value; })
				CLASS_MEMBER_EXTERNALMETHOD(set_content, {L"value"}, void(JsonNumber::*)(const vl::WString&), [](JsonNumber* node, const vl::WString& value){ node->content.value = value; })

				CLASS_MEMBER_PROPERTY(content, get_content, set_content)
			END_CLASS_MEMBER(JsonNumber)

			BEGIN_CLASS_MEMBER(JsonArray)
				CLASS_MEMBER_BASE(JsonNode)

				CLASS_MEMBER_CONSTRUCTOR(vl::Ptr<JsonArray>(), NO_PARAMETER)


				CLASS_MEMBER_FIELD(items)
			END_CLASS_MEMBER(JsonArray)

			BEGIN_CLASS_MEMBER(JsonObjectField)
				CLASS_MEMBER_BASE(JsonNode)

				CLASS_MEMBER_CONSTRUCTOR(vl::Ptr<JsonObjectField>(), NO_PARAMETER)

				CLASS_MEMBER_EXTERNALMETHOD(get_name, NO_PARAMETER, vl::WString(JsonObjectField::*)(), [](JsonObjectField* node){ return node->name.value; })
				CLASS_MEMBER_EXTERNALMETHOD(set_name, {L"value"}, void(JsonObjectField::*)(const vl::WString&), [](JsonObjectField* node, const vl::WString& value){ node->name.value = value; })

				CLASS_MEMBER_PROPERTY(name, get_name, set_name)
				CLASS_MEMBER_FIELD(value)
			END_CLASS_MEMBER(JsonObjectField)

			BEGIN_CLASS_MEMBER(JsonObject)
				CLASS_MEMBER_BASE(JsonNode)

				CLASS_MEMBER_CONSTRUCTOR(vl::Ptr<JsonObject>(), NO_PARAMETER)


				CLASS_MEMBER_FIELD(fields)
			END_CLASS_MEMBER(JsonObject)

			BEGIN_CLASS_MEMBER(JsonNode::IVisitor)
				CLASS_MEMBER_BASE(vl::reflection::IDescriptable)
				CLASS_MEMBER_EXTERNALCTOR(Ptr<JsonNode::IVisitor>(Ptr<IValueInterfaceProxy>), {L"proxy"}, &interface_proxy::JsonNode_IVisitor::Create)

				CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(JsonNode::IVisitor::*)(JsonLiteral* node))
				CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(JsonNode::IVisitor::*)(JsonString* node))
				CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(JsonNode::IVisitor::*)(JsonNumber* node))
				CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(JsonNode::IVisitor::*)(JsonArray* node))
				CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(JsonNode::IVisitor::*)(JsonObjectField* node))
				CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(JsonNode::IVisitor::*)(JsonObject* node))
			END_CLASS_MEMBER(JsonNode)

			class JsonTypeLoader : public vl::Object, public ITypeLoader
			{
			public:
				void Load(ITypeManager* manager)
				{
					ADD_TYPE_INFO(vl::parsing::json::JsonNode)
					ADD_TYPE_INFO(vl::parsing::json::JsonLiteral)
					ADD_TYPE_INFO(vl::parsing::json::JsonLiteral::JsonValue)
					ADD_TYPE_INFO(vl::parsing::json::JsonString)
					ADD_TYPE_INFO(vl::parsing::json::JsonNumber)
					ADD_TYPE_INFO(vl::parsing::json::JsonArray)
					ADD_TYPE_INFO(vl::parsing::json::JsonObjectField)
					ADD_TYPE_INFO(vl::parsing::json::JsonObject)
					ADD_TYPE_INFO(vl::parsing::json::JsonNode::IVisitor)
				}

				void Unload(ITypeManager* manager)
				{
				}
			};
#endif

			bool JsonLoadTypes()
			{
#ifndef VCZH_DEBUG_NO_REFLECTION
				ITypeManager* manager=GetGlobalTypeManager();
				if(manager)
				{
					Ptr<ITypeLoader> loader=new JsonTypeLoader;
					return manager->AddTypeLoader(loader);
				}
#endif
				return false;
			}
		}
	}
}
